import { defineStore } from "pinia";
import * as api from "../../api/index";
export const useProduct = defineStore("Product", {
  state() {
    return {
      productData: [],
    };
  },
  actions: {
    async FETCH_PRODUCT() {
      try {
        let res = await api.fetchProduct();
        console.log(res);
        this.productData = res.data;
      } catch (e) {
        console.log(e);
      }
    },
  },
});
